<? include 'server_config.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>ugly duckly</title>
		<style type="text/css">
			<!--
				html, body
				{
					margin:0px;
					padding:0px;
					font-size: 11px; 
					font-family: '돋움';
					line-height: 13px; 
					text-align:center;

				}
				a:link {text-decoration: underline; color: black; font-size: 13px; }
				a:visited {text-decoration: underline; color: black;font-size: 13px;}
				a:active {text-decoration: underline; color: black;font-size: 13px;}
				a:hover {text-decoration: underline; color: red;font-size: 13px;}

			-->
		</style>
	</head>


	<body oncontextmenu='return false' ondragstart='return false' onselectstart='return false'>
		<div style='margin:0 auto; width:1282px; text-align:left;'>
			<div style='position:absolute;  width:1282px; '><!-- background-image: url("img/depth2_04_question.jpg");' -->

			<!--상단 메뉴 로드-->
				<?
					include('top_menu.php');
				?>

			<!--페이지 상단 부분 시작-->

<?

	$sql = "SELECT * FROM ud_work WHERE type='".$_GET['type']."' ANd idx='".$_GET['idx']."' ORDER BY reg_timestamp DESC;";
		
	$result = mysql_query($sql,$connect);

	$row = mysql_fetch_row($result);
?>

				<div style='float:left;width:997px;'>
					<div style='width:944px;height:20px;float:left;'><span></span></div>
					<div style='float:left;margin-left:53px;width:920px;'>

					<?
	if($_GET['idx']!="")
	{
		?>
					
						<div style='width:920px;height:20px;float:left;'>
							<?
							if($_GET['type']==3)
							{
								?>
							<a href='p7.php'>목록으로 돌아가기</a>
								<?
							}
							else
							{
								?>


							<a href='p1.php?type=<? echo $_GET['type']; ?>'>목록으로 돌아가기</a>
							<?
							}
							?>
						</div>
						<div style='width:920px;height:10px;float:left;'><span></span></div>
<?
	}
		?>
						<div style='width:180px;height:20px;float:left;'><span>

<?
	if($_GET['idx']=="")
	{
		?>
							<img src='./img/m5_876x137.jpg'>
<?
	}
	else
	{
		?>
							<span style='font-size: 13px'><b>견적문의</b></span>
<?
	}
		?>
						</span></div>
						<div style='width:920px;height:6px;float:left;'><span></span></div>
						<div style='width:920px;height:1px;background:#525051;float:left;'><span></span></div>
						<div style='width:920px;height:48px;float:left;'><span></span></div>

						<div style='width:927px;height:99px;float:left;'>
<?
	if($_GET['idx']=="")
	{
		?>
안녕하세요. ugly duckly입니다. 궁금하신 사항을 문의하시면 이메일로 답해드립니다.<br/>
아래 내용을 작성하여 문의 주세요. 비공개글로 등록되며 ugly duckly만 열람 가능합니다.<br/>
<br/>
빠른 시일내로 답해드리겠습니다.<br/>
<?
	}
	else
	{
		?>
안녕하세요. ugly duckly입니다. 궁금하신 사항을 문의하시면 이메일로 답해드립니다.<br/>
아래 내용을 작성하여 문의 주세요. 비공개글로 등록되며 ugly duckly만 열람 가능합니다.<br/>
<br/>
빠른 시일내로 답해드리겠습니다.<br/>
														
<?
	}
		?>

						</div>

						<div style='width:645px;height:0px;float:left;border-top:1px dashed; '><span></span></div>

						<div style='width:920px;height:26px;float:left;'><span></span></div>


<? 
if($_GET['registered']==1)
{
	?>
						<div style='width:920px;height:100px;float:left;'><span>
							문의 내용이 등록 되었습니다.
						</span></div>	
	<?
}
else
{
	?>
						<form action='p5_proc.php' method='post' id='q_form'>

<?
	if($_GET['idx']!="")
	{
		?>
							<div style='width:180px;height:20px;float:left;'>
								<img src='http://sajaa.cafe24.com/title_img.php?text=<? echo $row[4];?>'>
							</div>
							<div style='width:920px;height:20px;float:left;'><span></span></div>						
<?
	}
		?>
							
							<input type='hidden' name='q_type' value='<? echo $row[1]; ?>'>
							<input type='hidden' name='q_idx' value='<? echo $row[0]; ?>'>
							<input type='hidden' name='q_item_name' value='<? echo $row[4]; ?>'>

							<div style='width:55px;height:15px;float:left;margin-top:3px;'><span>이름</span></div>
							<div style='width:16px;height:15px;float:left;margin-top:3px;'><span>:</span></div>
							<div style='width:840px;height:15px;float:left;'><span>
							
								<input type='text' name='q_name' style="width:377px;border:1px solid #c9c9c9; color:#282828; background:#ffffff; padding:1px 5px; margin:0px 0px 0px 0px; *margin:0px 0px 0px 0px; font-size: 11px;">
							
							</span></div>
							
							<div style='width:920px;height:10px;float:left;'><span></span></div>							

							
							<div style='width:55px;height:15px;float:left;margin-top:3px;'><span>연락처</span></div>
							<div style='width:16px;height:15px;float:left;margin-top:3px;'><span>:</span></div>
							<div style='width:840px;height:15px;float:left;'><span>
							
								<input type='text' name='q_contact' style="width:377px;border:1px solid #c9c9c9; color:#282828; background:#ffffff; padding:1px 5px; margin:0px 0px 0px 0px; *margin:0px 0px 0px 0px; font-size: 11px;">
							
							</span></div>				

							<div style='width:920px;height:10px;float:left;'><span></span></div>	
							
							<div style='width:55px;height:15px;float:left;margin-top:3px;'><span>이메일</span></div>
							<div style='width:16px;height:15px;float:left;margin-top:3px;'><span>:</span></div>
							<div style='width:840px;height:15px;float:left;'><span>
							
								<input type='text' name='q_mail' style="width:377px;border:1px solid #c9c9c9; color:#282828; background:#ffffff; padding:1px 5px; margin:0px 0px 0px 0px; *margin:0px 0px 0px 0px; font-size: 11px;">
							
							</span></div>				

							<div style='width:920px;height:10px;float:left;'><span></span></div>	
							
							<div style='width:55px;height:15px;float:left;margin-top:3px;'><span>문의내용</span></div>
							<div style='width:16px;height:15px;float:left;margin-top:3px;'><span>:</span></div>
							<div style='width:840px;height:205px;float:left;'><span>
							
								<textarea name='q_content' style="width:377px;height:200px;border:1px solid #c9c9c9; color:#282828; background:#ffffff; padding:1px 5px; margin:0px 0px 0px 0px; *margin:0px 0px 0px 0px; font-size: 11px;"></textarea>
							
							</span></div>		

							<div style='width:920px;height:10px;float:left;'><span></span></div>	
							<div style='width:425px;height:10px;float:left;'><span></span></div>	
							<div style='width:25px;height:15px;float:left;cursor:pointer;' onclick="q_form.submit();">완료</div>	
						</form>
<?
}
							?>

							<?/*
	$sql = "SELECT * FROM ud_news ORDER BY news_date DESC;";
	
	
	$result = mysql_query($sql,$connect);

	while($row = mysql_fetch_row($result))
	
	{
		echo "<b>".$row[1]." / ".substr($row[3],0,4).".".substr($row[3],4,2).".".substr($row[3],6,2)."</b><br>".$row[2]."<br><br>";
		
	}

*/
?>

					</div>
				</div>


			<!--페이지 상단 부분 끝-->

			<!--메인 우측 부분 부분 로드-->
				<?
					include('main_right.php');
				?>

			<!--하단부 로드-->
				<?
					include('bottom.php');
				?>


		</div>
	</body>
</html>